<?php

use think\facade\Route;
use app\common\middleware\AllowOriginMiddleware;
use app\common\middleware\MerchantAuthMiddleware;
use app\common\middleware\MerchantTokenMiddleware;
use app\common\middleware\MerchantCheckBaseInfoMiddleware;
use app\common\middleware\LogMiddleware;




Route::group(function () {

    //活动
    Route::group('system/new/activity', function () {
        Route::get('lst', '/getActivityList')->name('systemNewActivityproductLst')->option([
            '_alias' => '活动列表',
        ]);
        Route::get('product/lst', '/getList')->name('systemNewActivityproductLst')->option([
            '_alias' => '活动商品列表',
        ]);
        Route::post('product/create', '/create')->name('systemNewActivityproductCreate')->option([
            '_alias' => '活动商品添加',
        ]);
        Route::delete('product/delete/:id', '/delete')->name('systemNewActivityproductDelete')->option([
            '_alias' => '活动商品删除',
        ]);
        Route::get('product/product/lst', '/productLst')->name('systemNewActivityproductLst')->option([
            '_alias' => '商品列表',
        ]);


    })->prefix('merchant.store.product.NewActivityProduct');

})->middleware(AllowOriginMiddleware::class)
    ->middleware(MerchantTokenMiddleware::class, true)
    ->middleware(MerchantAuthMiddleware::class)
    ->middleware(MerchantCheckBaseInfoMiddleware::class)
    ->middleware(LogMiddleware::class);
